\documentclass{ctexart}
\usepackage{avanti}
\everymath{\color{Solarized-magenta}}
\pagestyle{empty} % 没有页眉和页脚

\tikzset{font=\large}

% define the plot style and the axis style
\tikzset{plain/.style = {draw=none, Solarized-base01, minimum height=25, minimum width=25}}
\tikzset{base/.style={smooth, thick, Solarized-base01, draw=Solarized-base01}}

\tikzset{box/.style = {rectangle,base,minimum height=25,minimum width=50}}
\tikzset{roundbox/.style = {rounded corners,base,minimum height=20,minimum width=310}}
\tikzset{op/.style = {circle,minimum width=20,base,fill=Solarized-base2}}

\tikzset{arrow/.style={->,>=stealth,base}}

\begin{document}

\begin{tikzpicture}

    \def \xarray{{-6,-3,0,3}}
    \def \yarray{{0, 1.5, 2.8, 4.1, 5.4, 6.7, 8.0}}

    \def \qxarray{{-6.3, -3.3, 2.7}}
    \pgfmathsetmacro{\qy}{0.6}

    \node [plain] (x1) at (\xarray[0], \yarray[0]) {$\xv_1$};
    \node [plain] (x2) at (\xarray[1], \yarray[0]) {$\xv_2$};
    \node [plain] (x3) at (\xarray[2], \yarray[0]) {...};
    \node [plain] (x4) at (\xarray[3], \yarray[0]) {$\xv_T$};

    \node (q) [plain] at (-8, \qy) {$\qv$};

    \node (s1) [box] at (\xarray[0], \yarray[1]) {$s(\cdot, \cdot)$};
    \node (s2) [box] at (\xarray[1], \yarray[1]) {$s(\cdot, \cdot)$};
    \node (s3) [plain] at (\xarray[2], \yarray[1]) {...};
    \node (s4) [box] at (\xarray[3], \yarray[1]) {$s(\cdot, \cdot)$};

    \node (s) [roundbox] at (-1.5, \yarray[2]) {Softmax};

    \node (a1) [plain] at (\xarray[0], \yarray[3]) {$\alpha_1$};
    \node (a2) [plain] at (\xarray[1], \yarray[3]) {$\alpha_2$};
    \node (a3) [plain] at (\xarray[2], \yarray[3]) {...};
    \node (a4) [plain] at (\xarray[3], \yarray[3]) {$\alpha_T$};

    \node [op] (t1) at (\xarray[0], \yarray[4]) {$\times$};
    \node [op] (t2) at (\xarray[1], \yarray[4]) {$\times$};
    \node [plain] (t3) at (\xarray[2], \yarray[4]) {...};
    \node [op] (t4) at (\xarray[3], \yarray[4]) {$\times$};

    \node [op] (add) at (-1.5, \yarray[5]) {$+$};

    \node [plain] (c) at (-1.5, \yarray[6]) {$\cv$};

    \foreach \i in {1,2,4}
        {
            \draw [arrow] (x\i) -- (s\i);
            \draw [arrow] (s\i) -- (s.south -| s\i);
            \draw [arrow,<-] (a\i) -- (s.north -| a\i);
            \draw [arrow] (a\i) -- (t\i);
            \draw [arrow] (t\i) -- (add);
            \draw [arrow,Solarized-yellow,dashed] (x\i) -- ++(1.2, 0) -- ++(0, 5.4) -- (t\i);
        }

    \draw [arrow] (add) -- (c);

    \draw [Solarized-blue,dashed] (q) -- (\qxarray[2], \qy);

    \draw [arrow,Solarized-blue,dashed] (\qxarray[0], \qy) -- ($(s1.south east)!(\qxarray[0], \qy)!(s1.south)$);
    \draw [arrow,Solarized-blue,dashed] (\qxarray[1], \qy) -- ($(s2.south east)!(\qxarray[1], \qy)!(s2.south)$);
    \draw [arrow,Solarized-blue,dashed] (\qxarray[2], \qy) -- ($(s4.south east)!(\qxarray[2], \qy)!(s4.south)$);

\end{tikzpicture}




\end{document}

